<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/* Copyright 2011 MTA SZTAKI - Licensed under: GNU General Public License v2.0 or later */</span><span class="WHIT">
<span class='line'>  2</span> 
<span class='line'>  3</span> </span><span class="COMM">// Global object</span><span class="WHIT">
<span class='line'>  4</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="WHIT">	</span><span class="NAME">SztakipediaTB</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="WHIT">		</span><span class="STRN">"Templates"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// All templates</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="WHIT">		</span><span class="STRN">"Suggestions"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="WHIT">		</span><span class="STRN">"Options"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// Global options</span><span class="WHIT">
<span class='line'>  9</span> </span><span class="WHIT">		</span><span class="STRN">"UserOptions"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="COMM">// User options</span><span class="WHIT">
<span class='line'> 10</span> </span><span class="WHIT">		</span><span class="STRN">"DefaultOptions"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="COMM">// Script defaults</span><span class="WHIT">
<span class='line'> 11</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="WHIT">	</span><span class="NAME">window</span><span class="PUNC">[</span><span class="STRN">'SztakipediaTB'</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="COMM">// for Closure</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 14</span> 
<span class='line'> 15</span> </span><span class="COMM">// Localized message text repository</span><span class="WHIT">
<span class='line'> 16</span> </span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">mw.usability</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">'undefined'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="WHIT">	</span><span class="NAME">mw.usability</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">	</span><span class="NAME">mw.usability.getMsg</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">m</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">mw.messages.get</span><span class="PUNC">(</span><span class="NAME">m</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 20</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 21</span> </span><span class="WHIT">	</span><span class="NAME">mw.usability.addMessages</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">msgs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 22</span> </span><span class="WHIT">		</span><span class="NAME">mw.messages.set</span><span class="PUNC">(</span><span class="NAME">msgs</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 25</span> 
<span class='line'> 26</span> </span><span class="COMM">// XML entity encode/decode by DracoBlue</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="COMM">// source: http://dracoblue.net/dev/encodedecode-special-xml-characters-in-javascript/155/</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xmlValue2EntityMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">	</span><span class="STRN">'&'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'&amp;'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">	</span><span class="STRN">'"'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'&quot;'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">	</span><span class="STRN">'&lt;'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'&lt;'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">	</span><span class="STRN">'>'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'&gt;'</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">encodeXml</span><span class="PUNC">(</span><span class="NAME">string</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">string.replace</span><span class="PUNC">(</span><span class="REGX">/([\&"&lt;>])/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">xmlValue2EntityMap</span><span class="PUNC">[</span><span class="NAME">item</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 41</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">xmlEntity2ValueMap</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">		</span><span class="STRN">'&amp;'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'&'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">		</span><span class="STRN">'&quot;'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'"'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">		</span><span class="STRN">'&lt;'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'&lt;'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">		</span><span class="STRN">'&gt;'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'>'</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 47</span> 
<span class='line'> 48</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">decodeXml</span><span class="PUNC">(</span><span class="NAME">string</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 49</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">string.replace</span><span class="PUNC">(</span><span class="REGX">/(&quot;|&lt;|&gt;|&amp;)/g</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">item</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 50</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">xmlEntity2ValueMap</span><span class="PUNC">[</span><span class="NAME">item</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 53</span> 
<span class='line'> 54</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">decodeXmlJ</span><span class="PUNC">(</span><span class="NAME">str</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">	</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;div />'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">html</span><span class="PUNC">(</span><span class="NAME">str.replace</span><span class="PUNC">(</span><span class="REGX">/&lt;/g</span><span class="PUNC">,</span><span class="STRN">'&lt;'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 57</span> 
<span class='line'> 58</span> 
<span class='line'> 59</span> </span><span class="COMM">//$("#image").change(function() {</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="COMM">//    var src = $(this).val();</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="COMM">//</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="COMM">//    $("#imagePreview").html(src ? "&lt;img src='" + src + "'>" : "");</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="COMM">//});</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="COMM">// Add a .non-empty class to </span><span class="WHIT">
<span class='line'> 65</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">adjustCssClassEmptiness</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">	</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">el</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="KEYW">this</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 67</span> </span><span class="WHIT">	</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">el.val</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'> 68</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 69</span> </span><span class="WHIT">		</span><span class="NAME">el.removeClass</span><span class="PUNC">(</span><span class="STRN">'empty'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">		</span><span class="NAME">el.addClass</span><span class="PUNC">(</span><span class="STRN">'non-empty'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">	</span><span class="KEYW">else</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">	</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">		</span><span class="NAME">el.removeClass</span><span class="PUNC">(</span><span class="STRN">'non-empty'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">		</span><span class="NAME">el.addClass</span><span class="PUNC">(</span><span class="STRN">'empty'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 78</span> 
<span class='line'> 79</span> </span><span class="COMM">/**
<span class='line'> 80</span>  * @class Object for cite templates. Stores the information needed to construct template filling dialog windows.
<span class='line'> 81</span>  * @constructor Creates a template object, given its name and available fields.
<span class='line'> 82</span>  * @param {string} templatename
<span class='line'> 83</span>  * @param {string} shortform
<span class='line'> 84</span>  * @param {Object} basicfields Basic fields of the template.
<span class='line'> 85</span>  * @param {Object} [expandedfields] Extra fields of the template. Fields supplied here shall be optional and not present in basic fields.
<span class='line'> 86</span>  * @private
<span class='line'> 87</span>  */</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="KEYW">function</span><span class="WHIT"> </span><span class="NAME">sztakipediaTemplate</span><span class="PUNC">(</span><span class="NAME">templatename</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">shortform</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">basicfields</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">expandedfields</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">	</span><span class="COMM">//alert("New template: " + templatename);</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">	
<span class='line'> 91</span> 	</span><span class="COMM">/* Properties */</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 93</span> 	 * The template name - "cite web", "cite book", etc.
<span class='line'> 94</span> 	 * @type string
<span class='line'> 95</span> 	 */</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">	</span><span class="NAME">this.templatename</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">templatename</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 98</span> 	 * A short form, used for the dropdown box.
<span class='line'> 99</span> 	 * @type string
<span class='line'>100</span> 	 */</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">	</span><span class="NAME">this.shortform</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">shortform</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>102</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>103</span> 	 * Basic fields (e.g., author, title, publisher...)
<span class='line'>104</span> 	 * @type Object
<span class='line'>105</span> 	 */</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">	</span><span class="NAME">this.basic</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">basicfields</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">	
<span class='line'>108</span> 	</span><span class="COMM">/**
<span class='line'>109</span> 	 * Less common - quote, archiveurl - should be everything the template supports minus the basic ones
<span class='line'>110</span> 	 * @type Object
<span class='line'>111</span> 	 */</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">	</span><span class="NAME">this.extra</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">expandedfields</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">	
<span class='line'>114</span> 	</span><span class="COMM">/**
<span class='line'>115</span> 	 * Whether the template is a citation template.
<span class='line'>116</span> 	 * @type boolean
<span class='line'>117</span> 	 */</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">	</span><span class="NAME">this.refs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">	
<span class='line'>120</span> 	</span><span class="COMM">/**
<span class='line'>121</span> 	 * Whether previews are allowed for this template.
<span class='line'>122</span> 	 * Can be set to {@code false} for templates that do not generate output (e.g, PERSONDATA), or would generate too large HTML.
<span class='line'>123</span> 	 * @type boolean
<span class='line'>124</span> 	 */</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="NAME">this.preview</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>126</span> 
<span class='line'>127</span> </span><span class="WHIT">	</span><span class="COMM">// Add it to the list</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">	</span><span class="NAME">SztakipediaTB.Templates</span><span class="PUNC">[</span><span class="NAME">this.templatename</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">	
<span class='line'>130</span> 	</span><span class="COMM">// Methods</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>132</span> 	 * Create a HTML fragment for a form with the given fields as inputs.
<span class='line'>133</span> 	 * @param {Object} fields The fields to be used for creating input widgets.
<span class='line'>134</span> 	 * @return {Object} The jQuery DOM element containing the HTML fragment.
<span class='line'>135</span> 	 */</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">	</span><span class="NAME">this.makeFormInner</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">fields</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">trs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">new</span><span class="WHIT"> </span><span class="NAME">Array</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">fields.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">fieldobj</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fields</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">field</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fieldobj.field</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">ad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">im</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">$j.inArray</span><span class="PUNC">(</span><span class="NAME">field</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.getOption</span><span class="PUNC">(</span><span class="STRN">'autodate fields'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>145</span> </span><span class="WHIT">				</span><span class="NAME">im</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;img />'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>146</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'src'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'http://upload.wikimedia.org/wikipedia/commons/thumb/7/7b/Nuvola_apps_date.svg/20px-Nuvola_apps_date.svg.png'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>147</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'alt'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-insert-date'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'title'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-insert-date'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT">				</span><span class="NAME">ad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;a/>'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'href'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'#'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">im</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-date-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">				</span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'#sztakipedia-date-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">live</span><span class="PUNC">(</span><span class="STRN">'click'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.fillAccessdate</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>155</span> 
<span class='line'>156</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fieldobj.autofillid</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">autotype</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fieldobj.autofillid</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">				</span><span class="NAME">im</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;img />'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'src'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'http://upload.wikimedia.org/wikipedia/commons/thumb/1/17/System-search.svg/18px-System-search.svg.png'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'alt'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-autofill-alt'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'title'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-autofill-alt'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">				</span><span class="NAME">ad</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;a />'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>162</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'href'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'#'</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">im</span><span class="PUNC">)</span><span class="WHIT">
<span class='line'>164</span> </span><span class="WHIT">					</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-auto-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">autotype</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">				</span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'#sztakipedia-auto-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">autotype</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">live</span><span class="PUNC">(</span><span class="STRN">'click'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.initAutofill</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>167</span> 
<span class='line'>168</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-label'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">			</span><span class="COMM">// FIXME if (typeof display == 'undefined' || display == '' || display == false)</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">			</span><span class="NAME">display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.fixStr</span><span class="PUNC">(</span><span class="NAME">field</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>171</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tooltip</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">fieldobj.tooltip</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;abbr />'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'title'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="NAME">fieldobj.tooltip</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">decodeXmlJ</span><span class="PUNC">(</span><span class="NAME">fieldobj.tooltip</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="STRN">'*'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">addClass</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-field-tooltip'</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>172</span> 
<span class='line'>173</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">input</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">''</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ad</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">				</span><span class="NAME">input</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;input tabindex="1" style="width:82%" type="text" />&nbsp;'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">				</span><span class="NAME">input</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;input tabindex="1" style="width:100%" type="text" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>178</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>179</span> </span><span class="WHIT">			</span><span class="NAME">input.attr</span><span class="PUNC">(</span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>180</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">fieldobj.autofillprop</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">				</span><span class="NAME">input.addClass</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">fieldobj.autofillprop</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">			</span><span class="NAME">input.change</span><span class="PUNC">(</span><span class="NAME">adjustCssClassEmptiness</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">change</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">label</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;label />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">			</span><span class="NAME">label.attr</span><span class="PUNC">(</span><span class="STRN">'for'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="NAME">display</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>186</span> </span><span class="WHIT">			</span><span class="NAME">label.attr</span><span class="PUNC">(</span><span class="STRN">'title'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'raw field name: '</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">field</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>187</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">tooltip</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>188</span> </span><span class="WHIT">				</span><span class="NAME">label.append</span><span class="PUNC">(</span><span class="NAME">tooltip</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>189</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">style</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">'text-align:right; width:20%;'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">				</span><span class="NAME">style</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">' padding-left:1em;'</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>193</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT"> </span><span class="KEYW">else</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>194</span> </span><span class="WHIT">				</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;tr />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>195</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>196</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">td1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;td class="sztakipedia-form-td" />'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">attr</span><span class="PUNC">(</span><span class="STRN">'style'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">style</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>197</span> </span><span class="WHIT">			</span><span class="NAME">td1.append</span><span class="PUNC">(</span><span class="NAME">label</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>198</span> </span><span class="WHIT">			</span><span class="NAME">tr.append</span><span class="PUNC">(</span><span class="NAME">td1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>199</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">td2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;td class="sztakipedia-form-td" style="width:30%" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">			</span><span class="NAME">td2.append</span><span class="PUNC">(</span><span class="NAME">input</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">ad</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">				</span><span class="NAME">td2.append</span><span class="PUNC">(</span><span class="NAME">ad</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">			</span><span class="NAME">tr.append</span><span class="PUNC">(</span><span class="NAME">td2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">%</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT">				</span><span class="NAME">trs.push</span><span class="PUNC">(</span><span class="NAME">tr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>207</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>208</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>209</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">trs</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>210</span> 
<span class='line'>211</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>212</span> 
<span class='line'>213</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>214</span> 	 * Gives a little bit of HTML so the open form can be identified. 
<span class='line'>215</span> 	 * Also required to interoperate with wikieditor, which checks for {@code $j(...).length == 0} to determine emptiness.
<span class='line'>216</span> 	 * @return {Object} a jQuery DOM element
<span class='line'>217</span> 	 */</span><span class="WHIT">
<span class='line'>218</span> </span><span class="WHIT">	</span><span class="NAME">this.getInitial</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hidden</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;input type="hidden" class="sztakipedia-template" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT">		</span><span class="NAME">hidden.val</span><span class="PUNC">(</span><span class="NAME">this.templatename</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">hidden</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>223</span> 
<span class='line'>224</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>225</span> 	 * Makes the form used in the dialog boxes.
<span class='line'>226</span> 	 * @return {Object} a jQuery DOM element
<span class='line'>227</span> 	 */</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">	</span><span class="NAME">this.getForm</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>229</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">main</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">"&lt;div class='sztakipedia-form-container' />"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">form1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;table style="width:90%; background-color:transparent;" class="sztakipedia-basic-fields" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">trs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.makeFormInner</span><span class="PUNC">(</span><span class="NAME">this.basic</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">trs.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">			</span><span class="NAME">form1.append</span><span class="PUNC">(</span><span class="NAME">trs</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>235</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>236</span> 
<span class='line'>237</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.extra</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>238</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">form2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;table style="width:100%; background-color:transparent; display:none" class="sztakipedia-extra-fields">'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">			</span><span class="NAME">trs</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this.makeFormInner</span><span class="PUNC">(</span><span class="NAME">this.extra</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NAME">trs.length</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">				</span><span class="NAME">form2.append</span><span class="PUNC">(</span><span class="NAME">trs</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>243</span> </span><span class="WHIT">		  </span><span class="NAME">main.append</span><span class="PUNC">(</span><span class="NAME">form1</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">form2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>244</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>245</span> 
<span class='line'>246</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.refs</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>247</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">form3</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;table style="width:95%; background-color:transparent;padding-top:1em" class="sztakipedia-other-fields">'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>248</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">tr</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;tr />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>249</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">td1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;td class="sztakipedia-form-td" style="text-align:right; width:20%" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">label1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;label />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">			</span><span class="NAME">label1.attr</span><span class="PUNC">(</span><span class="STRN">'for'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-name'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-name-label'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">			</span><span class="NAME">td1.append</span><span class="PUNC">(</span><span class="NAME">label1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">td2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;td class="sztakipedia-form-td" style="width:30%" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">input1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;input tabindex="1" style="width:auto" type="text" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">			</span><span class="NAME">input1.attr</span><span class="PUNC">(</span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-name'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">			</span><span class="NAME">td2.append</span><span class="PUNC">(</span><span class="NAME">input1</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">td3</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;td class="sztakipedia-form-td" style="text-align:right; padding-left:1em; width:20%">'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">label2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;label />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">			</span><span class="NAME">label2.attr</span><span class="PUNC">(</span><span class="STRN">'for'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-group'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">text</span><span class="PUNC">(</span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-group-label'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">			</span><span class="NAME">td3.append</span><span class="PUNC">(</span><span class="NAME">label2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>261</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">td4</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;td class="sztakipedia-form-td" style="width:30%" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>262</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">input2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;input tabindex="1" style="width:auto" type="text" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>263</span> </span><span class="WHIT">			</span><span class="NAME">input2.attr</span><span class="PUNC">(</span><span class="STRN">'id'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'sztakipedia-'</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">SztakipediaTB.escStr</span><span class="PUNC">(</span><span class="NAME">this.shortform</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="STRN">'-group'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">			</span><span class="NAME">td4.append</span><span class="PUNC">(</span><span class="NAME">input2</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">			</span><span class="NAME">tr.append</span><span class="PUNC">(</span><span class="NAME">td1</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">td2</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">td3</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="NAME">td4</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>266</span> </span><span class="WHIT">			</span><span class="NAME">form3.append</span><span class="PUNC">(</span><span class="NAME">tr</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT">			</span><span class="NAME">main.append</span><span class="PUNC">(</span><span class="NAME">form3</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>269</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">extras</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;div />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>270</span> </span><span class="WHIT">		</span><span class="NAME">extras.append</span><span class="PUNC">(</span><span class="STRN">'&lt;input type="hidden" class="sztakipedia-form-status" value="closed" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">hidden</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;input type="hidden" class="sztakipedia-template" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT">		</span><span class="NAME">hidden.val</span><span class="PUNC">(</span><span class="NAME">this.templatename</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>273</span> </span><span class="WHIT">		</span><span class="NAME">extras.append</span><span class="PUNC">(</span><span class="NAME">hidden</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>274</span> </span><span class="WHIT">		
<span class='line'>275</span> 		</span><span class="KEYW">if</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">this.preview</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">span1</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;span class="sztakipedia-preview-label" style="display:none;" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>277</span> </span><span class="WHIT">			</span><span class="NAME">span1.text</span><span class="PUNC">(</span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-raw-preview'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT">			</span><span class="NAME">extras.append</span><span class="PUNC">(</span><span class="NAME">span1</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="STRN">'&lt;div class="sztakipedia-ref-preview" style="padding:0.5em; font-size:110%" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">span2</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;span class="sztakipedia-prev-parsed-label" style="display:none;" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">			</span><span class="NAME">span2.text</span><span class="PUNC">(</span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-parsed-label'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">			</span><span class="NAME">extras.append</span><span class="PUNC">(</span><span class="NAME">span2</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">append</span><span class="PUNC">(</span><span class="STRN">'&lt;div class="sztakipedia-preview-parsed" style="padding-bottom:0.5em; font-size:110%" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">link</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'&lt;a href="#" class="sztakipedia-prev-parse" style="margin:0 1em 0 1em; display:none; color:darkblue" />'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT">			</span><span class="NAME">link.text</span><span class="PUNC">(</span><span class="NAME">mw.usability.getMsg</span><span class="PUNC">(</span><span class="STRN">'sztakipedia-form-parse'</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT">			</span><span class="NAME">extras.append</span><span class="PUNC">(</span><span class="NAME">link</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>285</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>286</span> </span><span class="WHIT">		
<span class='line'>287</span> 		</span><span class="NAME">main.append</span><span class="PUNC">(</span><span class="NAME">extras</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>288</span> 
<span class='line'>289</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">main</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>291</span> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>292</span> 
<span class='line'>293</span> 
<span class='line'>294</span> </span><span class="NAME">$j</span><span class="PUNC">(</span><span class="STRN">'head'</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">trigger</span><span class="PUNC">(</span><span class="STRN">'sztakipediatoolbarbase'</span><span class="PUNC">)</span><span class="PUNC">;</span></pre></body></html>